const express = require('express');
const app = express();

// get请求参数的解析
app.get('/itemList', (req,res)=> {
  // page和pageSize
  console.log(req.query);
  res.send({
    code: 0,
    msg: 'success',
    data: "这是数据"
  })
})
// post请求参数的解析
app.post('/cateList', (req,res)=> {
  // page和pageSize
  console.log(req.body);
  res.send({
    code: 0,
    msg: 'success',
    data: "这是post请求数据"
  })
})
app.listen(3000, () => {
  console.log('start at port 3000');
})